package com.andova

import androidx.annotation.IntDef

const val ERROR_UNKNOWN = -2
const val RESPONSE_SUCCESS = 10180
const val RESPONSE_EMPTY = 10181 // 服务端响应的内容数据为空
const val ERROR_URL2SERVER = 10182 // 连接地址或服务端响应出错信息
const val ERROR_JSON_SYNTAX = 10183 // 数据解析异常
const val ERROR_TIMEOUT = 10184 // 连接超时异常
const val ERROR_CONNECT = 10185 // 连接出错
const val ERROR_SSL_HANDSHAKE = 10186 // SSL证书错误
const val ERROR_NO_NETWORK = 10187 // 网络未连接
const val ERROR_NO_ROUTE_TO_HOST = 10188 // 没有到主机的路由
const val ERROR_UNKNOWN_HOST = 10189
const val ERROR_ILLEGAL_ARGUMENT = 10191

@IntDef(
        ERROR_UNKNOWN, RESPONSE_EMPTY, RESPONSE_SUCCESS, ERROR_URL2SERVER, ERROR_JSON_SYNTAX,
        ERROR_TIMEOUT, ERROR_CONNECT, ERROR_SSL_HANDSHAKE, ERROR_NO_NETWORK,
        ERROR_NO_ROUTE_TO_HOST, ERROR_UNKNOWN_HOST, ERROR_ILLEGAL_ARGUMENT
)
@Retention(AnnotationRetention.SOURCE)
annotation class NETWORK